import { Component } from 'react';
import { Routes, Route, Navigate } from "react-router-dom";
import Home from "../views/home.jsx";
import Items from "../views/items.jsx";
import Cart from "../views/cart.jsx";
import My from "../views/my.jsx";


import Vnav from "../components/nav.jsx";
class Index extends Component {

    render() {
        return (
            <div>
                <Routes>
                    <Route path='home' element={<Home></Home>}></Route>
                    <Route path='items' element={<Items></Items>}></Route>
                    <Route path='cart' element={<Cart></Cart>}></Route>
                    <Route path='my' element={<My></My> }></Route>
                    <Route path='*' element={<Navigate to='home'></Navigate>}></Route>
                </Routes>
                <Vnav></Vnav>
            </div>
        );
    }
}
export default Index;